package com.liuc.practice.bank.transfer.utils;

import com.alibaba.druid.pool.DruidDataSource;

import java.sql.Connection;

/**
 * @Author Liu Chang
 * @Date 2021/2/23 11:41 上午
 */
public class DruidUtils {

    private DruidUtils(){
    }

    private static DruidDataSource druidDataSource = new DruidDataSource();


    static {
        druidDataSource.setDriverClassName("com.mysql.jdbc.Driver");
        druidDataSource.setUrl("jdbc:mysql://localhost:3306/bank_transfer");
        druidDataSource.setUsername("root");
        druidDataSource.setPassword("abcd1234");

    }

    public static DruidDataSource getInstance() {
        return druidDataSource;
    }

}
